<%@ taglib prefix="s" uri="/struts-tags"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="basestyle.css"/>
</head>
<body id="layout">
	<div id="bodyheader">View Projects</div>
	<br></br>
	<div id="bodystyle">
	<s:if test="projects != null">
		<table id="datatable">
		<tr>
			<th><s:text name="Project Id"/></th>
			<th><s:text name="Project Code" /></th>
			<th><s:text name="Project Name" /></th>
			<th><s:text name="Project Client" /></th>
			<th><s:text name="Project Manager" /></th>
			<th><s:text name="Project Department" /></th>
			<th><s:text name="Project Budget" /></th>
			<th><s:text name="Man Hours Required" /></th>
		</tr>

		<s:iterator value="projects" status="status">
			<tr class="<s:if test="#status.even">even</s:if><s:else>odd</s:else>">
				<td class="nowrap"><s:property value="projectId"/></td>
				<td class="nowrap"><s:property value="projectName"/></td>
				<td class="nowrap"><s:property value="projectCode"/></td>
				<td class="nowrap"><s:property value="clientId"/></td>
				<td class="nowrap"><s:property value="projMgrId"/></td>
				<td class="nowrap"><s:property value="deptId"/></td>
				<td class="nowrap"><s:property value="budget"/></td>
				<td class="nowrap"><s:property value="man_hour_req"/></td>
				<td>
					<a href="<s:url action="editProject">
						<s:param name="pcode" value="projectCode"/>
						<s:param name="pname" value="projectName"/>
						<s:param name="proj_deptId" value="deptId"/>
						<s:param name="proj_clientId" value="clientId"/>
						<s:param name="pmgrId" value="projMgrId"/>
						<s:param name="projBudget" value="budget"/>
						<s:param name="projManHour" value="man_hour_req"/>
						<s:param name="projectId" value="projectId"/></s:url>">
					<s:property value="projectName"/>
					</a>
				</td>
			</tr>
		</s:iterator>
		</table>
	</s:if>
	<br></br>
	<s:else>
			No projects in the system.
	</s:else>

	</div>
</body>
</html>
